package com.ruoyi.biz.service.impl;

import java.util.List;

import com.ruoyi.biz.domain.EquipmentType;
import com.ruoyi.biz.mapper.EquipmentTypeMapper;
import com.ruoyi.biz.service.IEquipmentTypeService;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author ruoyi
 * @date 2020-11-30
 */
@Service
public class EquipmentTypeServiceImpl implements IEquipmentTypeService
{
    @Autowired
    private EquipmentTypeMapper equipmentTypeMapper;

    /**
     * 查询【请填写功能名称】
     *
     * @param equipmentTypeId 【请填写功能名称】ID
     * @return 【请填写功能名称】
     */
    @Override
    public EquipmentType selectEquipmentTypeById(Long equipmentTypeId)
    {
        return equipmentTypeMapper.selectEquipmentTypeById(equipmentTypeId);
    }

    /**
     * 查询【请填写功能名称】列表
     *
     * @param equipmentType 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<EquipmentType> selectEquipmentTypeList(EquipmentType equipmentType)
    {
        return equipmentTypeMapper.selectEquipmentTypeList(equipmentType);
    }

    /**
     * 新增【请填写功能名称】
     *
     * @param equipmentType 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertEquipmentType(EquipmentType equipmentType)
    {
        equipmentType.setCreateTime(DateUtils.getNowDate());
        return equipmentTypeMapper.insertEquipmentType(equipmentType);
    }

    /**
     * 修改【请填写功能名称】
     *
     * @param equipmentType 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateEquipmentType(EquipmentType equipmentType)
    {
        equipmentType.setUpdateTime(DateUtils.getNowDate());
        return equipmentTypeMapper.updateEquipmentType(equipmentType);
    }

    /**
     * 批量删除【请填写功能名称】
     *
     * @param equipmentTypeIds 需要删除的【请填写功能名称】ID
     * @return 结果
     */
    @Override
    public int deleteEquipmentTypeByIds(Long[] equipmentTypeIds)
    {
        return equipmentTypeMapper.deleteEquipmentTypeByIds(equipmentTypeIds);
    }

    /**
     * 删除【请填写功能名称】信息
     *
     * @param equipmentTypeId 【请填写功能名称】ID
     * @return 结果
     */
    @Override
    public int deleteEquipmentTypeById(Long equipmentTypeId)
    {
        return equipmentTypeMapper.deleteEquipmentTypeById(equipmentTypeId);
    }
}
